home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////////////////////
- //
- // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
- //
- // NAME: iw-Navigation.js (Javascript file for iw-Navigation.HTM)
- //
- // Copyright (c) 2001 by Symantec Corporation. All rights reserved.
- //
- ////////////////////////////////////////////////////////////////////////////////////////////
-
- // Move these global vairables to the top.
- var iBackOff = 0;
- var iBackOn = 4;
- var iNextOff = 0;
- var iNextOn = 2;
- var iCloseOff = 0;
- var iCloseOn = 1;
-
- function dprintf(str)
- {
- //alert(str);
- }
-
- function OnKeyDownHandler()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_ESCAPE = 27;
-
- if (window.event.keyCode == VK_ESCAPE)
- {
- // Escape key.. We want to exit out of the wizard..
- parent.window.navigate("res://closeme.xyz");
-
- }
-
- }
-
- function OnTabOverNext()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_TAB = 9;
- if (window.event.keyCode == VK_TAB)
- {
- if(CloseB.disabled == true)
- window.parent.frames("bottom",0).focus();
- }
-
-
- }
-
- function OnFocus()
- {
- if(BackB.disabled == false)
- BackB.focus();
- else
- {
- if(!NextB.disabled)
- NextB.focus();
- else
- FinishB.focus();
-
- }
- }
-
- function OnTabOverClose()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_TAB = 9;
- if (window.event.keyCode == VK_TAB)
- {
- window.parent.frames("contents",0).focus();
- }
-
- }
-
- function OnLoad()
- {
-
- SetWizardButtons(iBackOff, iNextOn, iCloseOn);
-
- if(BackB.disabled == false)
- BackB.focus();
- else
- {
- if(!NextB.disabled)
- NextB.focus();
- else
- FinishB.focus();
-
- }
-
- }
-
- function SetContent(pPane)
- {
- if (pPane != null)
- {
- SetHighlight(pPane);
- SetHeadingHighlight(pPane);
- window.parent.frames("main",0).navigate(pPane.m_htm)
-
- // Set Next and Back Buttons
- if(pPane.m_pNextLink == null) // Remove Close, Change Next
- SetWizardButtons(iBackOn, iNextOff, iCloseOff);
- else if(pPane.m_pPreviousLink == null) // Remove Back
- SetWizardButtons(iBackOff, iNextOn, iCloseOn);
- else
- SetWizardButtons(iBackOn, iNextOn, iCloseOn);
-
- }
- else
- parent.window.navigate("res://closeme.xyz");
- }
-
- function GoNext(docTitle)
- {
-
- // MessageBox() Flags
- var MB_OK = 0x00000000;
- var MB_OKCANCEL = 0x00000001;
- var MB_ABORTRETRYIGNORE = 0x00000002;
- var MB_YESNOCANCEL = 0x00000003;
- var MB_YESNO = 0x00000004;
- var MB_RETRYCANCEL = 0x00000005;
-
- var MB_ICONHAND = 0x00000010;
- var MB_ICONQUESTION = 0x00000020;
- var MB_ICONEXCLAMATION = 0x00000030;
- var MB_ICONASTERISK = 0x00000040;
-
- var MB_USERICON = 0x00000080;
- var MB_ICONWARNING = MB_ICONEXCLAMATION;
- var MB_ICONERROR = MB_ICONHAND;
-
- var MB_ICONINFORMATION = MB_ICONASTERISK;
- var MB_ICONSTOP = MB_ICONHAND;
-
- var IDOK = 1;
- var IDCANCEL = 2;
- var IDABORT = 3;
- var IDRETRY = 4;
- var IDIGNORE = 5;
- var IDYES = 6;
- var IDNO = 7;
-
- // Pages GoNext Routines
- // Check for null object if the page hasn't been loaded yet.. This is for all those Fast and Furious clickers out there
- if (parent.window.frames("main",0).Page_GoNext == null)
- return
- else if (parent.window.frames("main",0).Page_GoNext() != true)
- return;
-
- var iMsgBoxReturn;
- var Contents = window.parent.frames("contents",0);
-
- if (docTitle == "Summary")
- {
- parent.window.navigate("res://closeme.xyz");
- return
- }
- else
- {
- // Check to see object exist.. Need this to fix bug where objects aren't ready in other frames
- var pNextPane = Contents.FindPane(docTitle);
- if (pNextPane == null)
- return;
-
- pNextPane = pNextPane.m_pNextLink;
- SetContent(pNextPane);
-
- }
-
- }
-
- function GoBack(docTitle)
- {
-
- // Pages GoBack Routines
- // Check for null object if the page hasn't been loaded yet.. This is for all those Fast and Furious clickers out there
- if (parent.window.frames("main",0).Page_GoBack == null)
- return
- else if (parent.window.frames("main",0).Page_GoBack() != true)
- return;
-
- var Contents = window.parent.frames("contents",0);
- var pPreviousPane = Contents.FindPane(docTitle);
-
- if (pPreviousPane == null)
- return;
-
-
-
- pPreviousPane = pPreviousPane.m_pPreviousLink;
- SetContent(pPreviousPane);
-
- }
-
-
- // Back:0 - Back Disabled Back:1 - Back Enabled
- // Next:0 - "Finish" Button Next:1 - Next Enabled
- // Close:0 - Close Disabled Close:1 - Close Enabled
- // Function to Set Navigation Buttons
- function SetWizardButtons(iBack, iNext, iClose)
- {
- var iWizardButtons = iBack + iNext + iClose;
-
- switch(iWizardButtons)
-
- {
- case 0:
- // Back:0, Next:0, Close:0
- BackB.disabled = true;
-
- NextB.disable = true;
- NextB.style.display = "none";
- FinishB.disable = false;
- FinishB.style.display = "";
-
- CloseB.disabled = true;
- break;
-
- case 2:
- // Back:0, Next:1, Close:0
- BackB.disabled = true;
-
- NextB.disable = false;
- NextB.style.display = "";
- FinishB.disable = true;
- FinishB.style.display = "none";
-
- CloseB.disabled = true;
- break;
-
- case 3:
- // Back:0, Next:1, Close:1
- BackB.disabled = true;
-
- NextB.disable = false;
- NextB.style.display = "";
- FinishB.disable = true;
- FinishB.style.display = "none";
-
- CloseB.disabled = false;
- break;
-
- case 4:
- // Back:1, Next:0, Close:0
- BackB.disabled = false;
-
- NextB.disable = true;
- NextB.style.display = "none";
- FinishB.disable = false;
- FinishB.style.display = "";
-
- CloseB.disabled = true;
- break;
-
- case 5:
- // Back:1, Next:0, Close:1
- BackB.disabled = false;
-
- NextB.disable = true;
- NextB.style.display = "none";
- FinishB.disable = false;
- FinishB.style.display = "";
-
- CloseB.disabled = false;
- break;
-
-
- case 6:
- // Back:1, Next:1, Close:0
- BackB.disabled = false;
-
- NextB.disable = false;
- NextB.style.display = "";
- FinishB.disable = true;
- FinishB.style.display = "none";
-
- CloseB.disabled = true;
- break;
-
- case 7:
- // Back:1, Next:1, Close:1;
- BackB.disabled = false;
-
- NextB.disable = false;
- NextB.style.display = "";
- FinishB.disable = true;
- FinishB.style.display = "none";
-
- CloseB.disabled = false;
- break;
-
- }
- }
-
-
- function SetHeadingHighlight(pPane)
- {
-
- var Contents = window.parent.frames("contents",0);
- SetVisible(false, Contents.AccountModeHeadingPane);
- SetVisible(false, Contents.WindowsManagedHeadingPane);
- SetVisible(false, Contents.ApplicationManagedHeadingPane);
- SetVisible(false, Contents.SummaryHeadingPane);
-
- SetVisible(true, pPane);
- }
-
- function SetHighlight(pPane)
- {
-
-
- var Contents = window.parent.frames("contents",0);
-
-
- if (Contents.SetTypePane.m_bPageOn == true)
- SetVisible(false, Contents.SetTypePane);
-
- if (Contents.SupervisorPane.m_bPageOn == true)
- SetVisible(false, Contents.SupervisorPane);
-
- if (Contents.CreateAccountsPane.m_bPageOn == true)
- SetVisible(false, Contents.CreateAccountsPane);
-
- if (Contents.SetPasswordPane.m_bPageOn == true)
- SetVisible(false, Contents.SetPasswordPane);
-
- if (Contents.DefaultAccountPane.m_bPageOn == true)
- SetVisible(false, Contents.DefaultAccountPane);
-
- SetVisible(true, pPane);
-
- }
-
-
- function SetVisible(bHighlight, pPane)
- {
-
- if(bHighlight)
- {
- pPane.m_hID.style.display = "";
- pPane.m_ID.style.display = "none";
- pPane.m_HLHeading.style.display = "";
- pPane.m_Heading.style.display = "none";
- }
- else
- {
- pPane.m_hID.style.display = "none";
- pPane.m_ID.style.display = "";
- pPane.m_HLHeading.style.display = "none";
- pPane.m_Heading.style.display = "";
- }
- }
-
- function BackB_OnClick()
- {
- try
- {
- BackB.disabled = true;
-
- var docTitle = window.parent.frames("main",0).document.title;
-
- GoBack(docTitle);
-
- if ((docTitle != "Set Type") && (docTitle != "Supervisor"))
- {
- BackB.disabled = false;
- }
- }
- catch(err)
- {
- BackB.disabled = false;
- return;
- }
- }
-
- function NextB_OnClick()
- {
- try
- {
- // Disable NextButton so user cannot constantly click next.
- NextB.disabled = true;
-
- GoNext(window.parent.frames("main",0).document.title);
-
- NextB.disabled = false;
- }
- catch(err)
- {
- NextB.disabled = false;
- return;
- }
- }
-
- function CloseB_OnClick()
- {
- parent.window.navigate("res://closeme.xyz");
- }
-
-
- function WrapNisum_OnProductEnabledChange()
- {
- if(WrapNisum.ProductEnabled == "unloaded")
- CloseB_OnClick();
- }